package com.core.zyyz.pcmc.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.core.common.annotation.Excel;
import com.core.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 机构层级对象 pcmc_org_hierarchy
 *
 * @author LiuFushun
 * @date 2024-10-29
 */
public class PcmcOrgHierarchy extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 组织关系编码 */
    @Excel(name = "组织关系编码")
    private String orgCode;

    /** 节点编码 */
    @Excel(name = "节点编码")
    private String nodeCode;

    /** 节点类型：E-员工，D-机构（部门） */
    @Excel(name = "节点类型：E-员工，D-机构", readConverterExp = "部=门")
    private String nodeType;

    /** 上级节点编码 */
    @Excel(name = "上级节点编码")
    private String parentNodeCode;

    /** 节点序列号 */
    @Excel(name = "节点序列号")
    private String nodeSeq;

    /** ID */
    private String ID;

    /** 是否主要的（员工挂靠多个机构时生效） */
    @Excel(name = "是否主要的", readConverterExp = "员=工挂靠多个机构时生效")
    private String MAJOR;

    /** 下级机构统计 */
    @Excel(name = "下级机构统计")
    private Integer deptCount;

    /** 下级员工统计 */
    @Excel(name = "下级员工统计")
    private Integer employeeCount;

    //展示在前端页面的字段
    @TableField(exist = false)//这表示该字段在数据库表中不存在。当使用MyBatis-Plus的自动注入SQL语句功能时，会忽略这个字段，不会将其包含在SQL查询语句中。
    private Boolean isLeaf;
    @TableField( exist = false)
    private String nodeName;
    @TableField( exist = false)
    private String nodeNameShow;

    public Boolean getIsLeaf() {
        return this.isLeaf;
    }

    public void setIsLeaf(Boolean isLeaf) {
        this.isLeaf = isLeaf;
    }

    public String getNodeName() {
        return nodeName;
    }

    public void setNodeName(String nodeName) {
        this.nodeName = nodeName;
    }

    public String getNodeNameShow() {
        return nodeNameShow;
    }

    public void setNodeNameShow(String nodeNameShow) {
        this.nodeNameShow = nodeNameShow;
    }

    public void setOrgCode(String orgCode)
    {
        this.orgCode = orgCode;
    }

    public String getOrgCode()
    {
        return orgCode;
    }
    public void setNodeCode(String nodeCode)
    {
        this.nodeCode = nodeCode;
    }

    public String getNodeCode()
    {
        return nodeCode;
    }
    public void setNodeType(String nodeType)
    {
        this.nodeType = nodeType;
    }

    public String getNodeType()
    {
        return nodeType;
    }
    public void setParentNodeCode(String parentNodeCode)
    {
        this.parentNodeCode = parentNodeCode;
    }

    public String getParentNodeCode()
    {
        return parentNodeCode;
    }
    public void setNodeSeq(String nodeSeq)
    {
        this.nodeSeq = nodeSeq;
    }

    public String getNodeSeq()
    {
        return nodeSeq;
    }
    public void setID(String ID)
    {
        this.ID = ID;
    }

    public String getID()
    {
        return ID;
    }
    public void setMAJOR(String MAJOR)
    {
        this.MAJOR = MAJOR;
    }

    public String getMAJOR()
    {
        return MAJOR;
    }
    public void setDeptCount(Integer deptCount)
    {
        this.deptCount = deptCount;
    }

    public Integer getDeptCount()
    {
        return deptCount;
    }
    public void setEmployeeCount(Integer employeeCount)
    {
        this.employeeCount = employeeCount;
    }

    public Integer getEmployeeCount()
    {
        return employeeCount;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("orgCode", getOrgCode())
                .append("nodeCode", getNodeCode())
                .append("nodeType", getNodeType())
                .append("parentNodeCode", getParentNodeCode())
                .append("nodeSeq", getNodeSeq())
                .append("ID", getID())
                .append("MAJOR", getMAJOR())
                .append("deptCount", getDeptCount())
                .append("employeeCount", getEmployeeCount())
                .toString();
    }
}
